<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'utilities.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="Huang">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<link rel="stylesheet" type="text/css" href="style/inf.css">

<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="js/inf.js"></script>

</head>

<!-- 说明：  如其他页面，即你所写的页面若有类似功能的标签，若要套用本页面格式，请在类似的标签内用相同的id或class属性
		  并引用style/inf.css文件，如上方。
		 如要写新的js函数，请写在inf.js文件内，并注释
 -->
<body onload="loadDormNameYear();" style="background-color: transparent;">
	<h1>水电费查询：</h1>
	楼号：
	<select id="dormBdName" size="1" name="dormName"
		onchange="loadDormNu('#dormNu', '#dormBdName', true);">
	</select> 宿舍号：
	<select id="dormNu" size="1" name="dormNu">
	</select> 年份：
	<select id="year" size="1" name="year">
	</select>
	<input type="button" value="查询" onclick="loadUtilities(1);"></input>
	
	<input id="add-Bt" type="button" value="新增" onclick="addUtiliInf();"/>
	
	<table id="infTable" border="1" bordercolor="#000000">
		<tr id="ttitle">
			<th scope="col">楼号</th>
			<th scope="col">宿舍号</th>
			<th scope="col">年份</th>
			<th scope="col">月份</th>
			<th scope="col">用电量（度）</th>
			<th scope="col">电费（元）</th>
			<th scope="col">交否</th>
			<th scope="col">用水量（立方米）</th>
			<th scope="col">水费(元)</th>
			<th scope="col">交否</th>
			<th scope="col">操作</th>
			<!-- 11.22 新增 -->
		</tr>
	</table>
	
	<!-- 翻页控件  -->
	<div id="changePage">
		<a href="javascript:void(0)" class="previous">上一页</a> <select
			id="page_select"></select> <a href="javascript:void(0)" class="next">下一页</a>
	</div>
	<div class="tip">请选择上方条件查询</div>
	<div id="blackBackground"></div>
	<!-- 新增和修改水电费对话框  -->
	<div id="newUtiInf_div" class="addDialog">
	<input type="hidden" id="uid" ><!-- 用来存放修改水电费记录的ID -->
		<div id="utiInf_l">
			<p>
				楼号：<select id="dormName_add" onchange='loadDormNu("#dormNu_add", "#dormName_add");'></select>
				宿舍号：<select id="dormNu_add" ></select>
			</p>
			<p>
				用电量：<input type="text" id="electricity" />
			</p>
			<p>
				用水量： <input type="text" id="water" />
			</p>

		</div>
		<div id="utiInf_r">
			<p>
				年月份： <input type="month" id="yearMonth" />
			</p>
			<p>
				电费：<input type="text" id="electricityC" />
			</p>
			<p>
				水费：<input type="text" id="waterC" />
			</p>
		</div>
		<div>
			<input type="button" id="edit_save" class="save" value="保存" onclick="editUtilities()"/>
			<input type="button" id="add_save" class="save" value="保存" onclick="addUtilities()"/> 
			<input type="button" id="close" value="关闭" onclick="hideAddUtiliInf();"/>
		</div>
	</div>
	
</body>
</html>
